package t4client;

import java.util.Scanner;

import t4invoke.Invoke;

public class Client {
	public static void main(String[] args) {
		int n = 0;
		Invoke in = new Invoke();
		Scanner sc = new Scanner(System.in);
		while (true) {
			System.out.println("输入1进货");
			System.out.println("输入2卖水果");
			System.out.println("输入3显示所有销售记录");
			System.out.println("输入4显示所有水果");
			System.out.println("输入5显示销量前三");
			System.out.println("输入6显示时间间隔内总利润");
			System.out.println("输入0退出");
			n = Integer.parseInt(sc.nextLine());
			switch (n) {
			case 1:
				in.purchase(sc);
				break;
			case 2:
				in.sell(sc);
				break;
			case 3:
				in.showAllSellRecord();
				break;
			case 4:
				in.showFruit();
				break;
			case 5:
				in.three();
				break;
			case 6:
				in.moneyGet(sc);
				break;
			}
			if (n == 0) {
				System.out.println("退出成功");
				break;
			}
		}
	}
}
